package com.yanqu.road.logic.bussiness.recharge;

import com.yanqu.road.entity.recharge.*;
import com.yanqu.road.logic.bussiness.DaoHelper;
import com.yanqu.road.utils.date.DateHelper;

import java.util.Date;
import java.util.List;
import java.util.Map;

public class RechargeBussiness {

	public static boolean resetFirstRecharge() {
		return DaoHelper.getRechargeGainDaoImpl().resetFirstRecharge();
	}

	public static boolean resetRechargeGain(int value) {
		return DaoHelper.getRechargeGainDaoImpl().resetRechargeGain(value);
	}

	public static List<RechargeOrder> getAllRechargeOrderList(long userId) {
		return DaoHelper.getRechargeDaoImpl().getAllRechargeOrderList(userId);
	}

	public static List<RechargeOrder> getLastMonthRechargeOrderList(long userId) {
		return DaoHelper.getRechargeDaoImpl().getLastMonthRechargeOrderList(userId);
	}

	public static boolean addRechargeOrder(RechargeOrder rechargeOrder) {
		return DaoHelper.getRechargeDaoImpl().addRechargeOrder(rechargeOrder);
	}

	public static boolean addRechargeOrderFull(RechargeOrder rechargeOrder) {
		return DaoHelper.getRechargeDaoImpl().addRechargeOrderFull(rechargeOrder);
	}

	public static RechargeOrder getRechargeOrder(String orderNo) {
		return DaoHelper.getRechargeDaoImpl().getRechargeOrder(orderNo);
	}

	public static RechargeOrder getRechargeOrderBySdkOrderNo(String orderNo) {
		return DaoHelper.getRechargeDaoImpl().getRechargeOrderBySdkOrderNo(orderNo);
	}

	public static boolean updateRechargeOrder(RechargeOrder rechargeOrder) {
		return DaoHelper.getRechargeDaoImpl().updateRechargeOrder(rechargeOrder);
	}
	public static boolean updateSubscribeRechargeOrder(RechargeOrder rechargeOrder) {
		return DaoHelper.getRechargeDaoImpl().updateSubscribeRechargeOrder(rechargeOrder);
	}

	public static boolean updateRechargeOrderStatus(RechargeOrder rechargeOrder) {
		return DaoHelper.getRechargeDaoImpl().updateRechargeOrderStatus(rechargeOrder);
	}

	public static boolean updateRechargeOrderRepeatBuy(RechargeOrder rechargeOrder) {
		return DaoHelper.getRechargeDaoImpl().updateRechargeOrderRepeatBuy(rechargeOrder);
	}

	public static Map<Integer, RechargeGain> getRechargeGainMap(long userId) {
		return DaoHelper.getRechargeGainDaoImpl().getRechargeGainMap(userId);
	}

	public static boolean addRechargeGain(RechargeGain rechargeGain) {
		return DaoHelper.getRechargeGainDaoImpl().add(rechargeGain);
	}

	public static boolean updateRechargeGain(RechargeGain rechargeGain) {
		return DaoHelper.getRechargeGainDaoImpl().update(rechargeGain);
	}

	public static List<ThirdPartyRechargeOrder> getThirdPartyRechargeOrderList(long userId) {
		return DaoHelper.getThirdPartyRechargeDaoImpl().getThirdPartyRechargeOrderList(userId);
	}

	public static boolean addThirdPartyRechargeOrder(ThirdPartyRechargeOrder thirdPartyRechargeOrder) {
		return DaoHelper.getThirdPartyRechargeDaoImpl().addThirdPartyRechargeOrder(thirdPartyRechargeOrder);
	}

	public static ThirdPartyRechargeOrder getThirdPartyRechargeOrder(String platformOrderNo) {
		return DaoHelper.getThirdPartyRechargeDaoImpl().getThirdPartyRechargeOrder(platformOrderNo);
	}

	public static boolean updateThirdPartyRechargeOrder(ThirdPartyRechargeOrder thirdPartyRechargeOrder) {
		return DaoHelper.getThirdPartyRechargeDaoImpl().updateThirdPartyRechargeOrder(thirdPartyRechargeOrder);
	}

	public static boolean updateThirdPartyRechargeRepeatBuy(ThirdPartyRechargeOrder thirdPartyRechargeOrder) {
		return DaoHelper.getThirdPartyRechargeDaoImpl().updateThirdPartyRechargeRepeatBuy(thirdPartyRechargeOrder);
	}

	public static boolean checkThirdPartyRechargeOrder(String platformOrderNo) {
		return DaoHelper.getThirdPartyRechargeDaoImpl().checkThirdPartyRechargeOrder(platformOrderNo);
	}

	public static Map<Integer, Map<Integer, RechargeMallTimes>> getRechargeTimesMap(long userId) {
		return DaoHelper.getRechargeMallTimesDaoImpl().getRechargeMallTimes(userId);
	}

	public static boolean addRechargeMallTimes(RechargeMallTimes times) {
		return DaoHelper.getRechargeMallTimesDaoImpl().add(times);
	}

	public static boolean updateRechargeMallTimes(RechargeMallTimes times) {
		return DaoHelper.getRechargeMallTimesDaoImpl().update(times);
	}

	public static boolean resetAllFirstRecharge() {
		return DaoHelper.getRechargeMallTimesDaoImpl().resetFirstRecharge();
	}

	public static boolean resetRechargeTimes(int src) {
		return DaoHelper.getRechargeMallTimesDaoImpl().resetRechargeTimes(src);
	}

	public static Map<Integer, RechargeMultipleInfo> getRechargeMultipleInfoList(int channelId) {
		return DaoHelper.getRechargeDaoImpl().getRechargeMultipleInfoList(channelId);
	}

	public static long getAllRechargeAmount(Date dataStart, Date dateEnd) {
		return DaoHelper.getRechargeDaoImpl().getAllRechargeAmount(DateHelper.date2String(dataStart), DateHelper.date2String(dateEnd));
	}

}
